; prolog.asm
; Basic start code & time initialisation

	.include "files.inc"
	.include "font4.inc"
	.include "disk.inc"
	.include "ext.inc"

	.import initmem	
	.import startup

	.segment "BASIC"

; Startup Basic program "2010 SYS prolog"
		.word	basprg
basprg:	.word	@end
		.word	2010
		.byte	$9E
		.byte	<(prolog / 1000 .mod 10) + $30
		.byte	<(prolog / 100 .mod 10) + $30
		.byte	<(prolog / 10 .mod 10) + $30
		.byte	<(prolog / 1 .mod 10) + $30
		.byte	0
@end:	.word	0

	.segment "BOOT"
	
prolog:	jsr cploader
		jsr initmem
		; set 4x8 pixel font (2)
		jsr initfnt4
		jsr scandrives
		jsr initext
		jmp startup
